-
-
Notifications
You must be signed in to change notification settings - Fork 17
Add ability to do nested dropdowns in navbar #291
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot for the PR! I have one major issue, but a couple of associated nerd snipes.
My main issue is the changing of the hover-over styling:
My other requests are:
- How would we feel about this being a concertina style thing where we have subsections of the menu expanding rather than popping out to the right?
- Is there any chance you can make this code handle the case where the menu goes off the bottom of the display? (i.e. by collapsing the main list?)
So this second iteration now uses concertina collapse rather than a dropdown, I think it is more suitable. It is still recursive though so you can have arbitrary depth on the nav sections. Importantly, hover over styling is fixed, I thought it was just lazy css originally but turns out its a pain cause we are having to replace loads of built in bootstrap stuff cause it doesnt support either nested dropdowns (as my first iteration did) or concertinas in dropdowns (as my second one does). as for going off the screeen errr.... one sec |
This comment was marked as outdated.
This comment was marked as outdated.
The CSS seems to be busted on all the preview builds? |
src/sunpy_sphinx_theme/__init__.py
Outdated
("ndcube", "https://docs.sunpy.org/projects/ndcube/", 3), | ||
("aiapy", "https://aiapy.readthedocs.io/", 3), | ||
("dkist", "https://docs.dkist.nso.edu/projects/python-tools", 3), | ||
("demcmc", "https://demcmc.readthedocs.io/en/stable/", 3), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You should probably submit this to be an affiliated package before we add it here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was moved to historical, it used to be a AF.
Thank you @alasdairwilson |
and on narrow devices:
This could go upstream I guess but would need to be generalised a fair bit I expect.